const Service = require('egg').Service;

class NewsService extends Service {
    async list(page = 1) {
        const { serverUrl, pageSize } = this.config.news;
        const newsList = await this.ctx.curl(`${serverUrl}news.json`, {
                dataType: 'json',
            })
            // console.log(newsList)
        return newsList.res.data.content
    }
}

module.exports = NewsService;